package ooday04;

public class AnimalTest {
    public static void main(String[] args) {


        Dog[] dogs=new Dog[3];
        dogs[0]=new Dog("小黑",1,"黑");
        dogs[1]=new Dog("大黑",3,"黑");
        dogs[2]=new Dog("小白",1,"白");
        for(int i=0;i< dogs.length;i++){
            dogs[i].drink();
            dogs[i].eat();
            dogs[i].lookHome();
            dogs[i].swim();
        }

        Chick[] chicks=new Chick[2];
        chicks[0]=new Chick("小花",1,"花");
        chicks[1]=new Chick("小白",2,"白");
        for(int i=0;i< chicks.length;i++){
            chicks[i].drink();
            chicks[i].eat();
            chicks[i].layEggs();
        }

        Fish[] fish=new Fish[3];
        fish[0]=new Fish("小绿",1,"绿");
        fish[1]=new Fish("小金",1,"金");
        fish[2]=new Fish("小红",1,"红");
        for(int i=0;i< fish.length;i++){
            fish[i].drink();
            fish[i].eat();
            fish[i].swim();
        }
    }
}
